import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/Layout'
import App from '@/views/App'
import About from '@/views/About'
import Home from '@/views/Home'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '/',
        component: App
      },
      {
        path: '/about',
        component: About
      },
      {
        path: '/home',
        component: Home
      }
    ]
  },
]

const router = new VueRouter({
  // 路径前是否要加公共路径 ?
  // base: '/base',
  routes
})

export default router
